package sg.edu.nus.iss.vmcs.command;

import sg.edu.nus.iss.vmcs.customer.CoinReceiver;

/**
 * 
 * @version 1.0
 * @author Qu Hui
 * 
 */
public class StoreCashCmd implements Command {

	private CoinReceiver coinReceiver;

	public StoreCashCmd(CoinReceiver coinReceiver) {
		this.coinReceiver = coinReceiver;
	}

	public void execute(Object o) {
		if (o instanceof Integer) {
			Integer weight = (Integer) o;
			coinReceiver.receiveCoin(weight);
		}
	}

}
